﻿<%@ Page Title="提现处理" Language="C#" MasterPageFile="~/manage/NestedMasterPage1.master" AutoEventWireup="true" CodeBehind="WithDrawManage.aspx.cs" Inherits="map.manage.Money.WithDrawManage" %>

<%@ Register Assembly="RuleCode.Common" Namespace="RuleCode.Controls" TagPrefix="cc2" %>

<%@ Register Assembly="AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"
    Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
    <link href="../../outstyle.css" rel="stylesheet" type="text/css" />
    <link href="../../Stylesheet1.css" rel="stylesheet" type="text/css" />
    <script src="../../js/dropdowncontent.js" type="text/javascript"></script>
    <style type="text/css">
        .MainContentDiv
        {
            width:90%;
        }
        .td_01
        {
            width:5%;
            text-align:center;
        }
        .td_0
        {
            width:15%;
        }
        .td_1
        {
            width:10%;
        }
        .td_2
        {
            width:15%;
        }
        .td_3
        {
            width:9%;
        }
        .td_4
        {
            width:30%;
        }
        .td_5
        {
            width:8%;         
            text-align:center;
        }  
        .td_6
        {
            width:8%;
            text-align:center;
        }
        .SubmitCharge
        {
            background:url(/img/btnTmp_orange.png) no-repeat 0px 0px;
            border:none;
            text-align:center;
            padding-left:20px;
            font-weight:bold ;
            cursor:pointer ;
            width:82px;
            height:34px;
        }    
        .CommandButton
        {
            background:url(/img/back-button_61x23.gif) no-repeat;
            height:23px;
            width:61px;
            border:none;
            cursor:pointer;
        }    
        .b_td_0
        {
            width:40%;
            text-align:right;
        }                    
        .b_td_1
        {
            width:60%;
            text-align:left;
        } 
        .f_td_0,.f_td_2
        {
            width:15%;
            text-align:right ;
        }              
        .f_td_1,.f_td_3
        {
            width:35%;
            text-align:left ;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <div class="MainContentDiv">
    <asp:UpdatePanel runat="server" ID="updatepanel1">
        <ContentTemplate>
            <div style=" margin:10px 15px 10px 15px;">
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class ="f_td_0">
                            申请提现状态：
                        </td>
                        <td class ="f_td_1">
                            <asp:DropDownList ID="StatusDropDownList" Width="150px" runat="server">
                                <asp:ListItem Value="">全部</asp:ListItem>    
                                <asp:ListItem Selected="True"   Value="1">已申请</asp:ListItem>
                                <asp:ListItem  Value="2">已审核</asp:ListItem> 
                                <asp:ListItem  Value="3">提现成功</asp:ListItem>
                                <asp:ListItem  Value="4">提现失败</asp:ListItem>   
                                <asp:ListItem  Value="0">未知</asp:ListItem>
                            </asp:DropDownList>
                        </td> 
                        <td class ="f_td_2">
                            申请人：
                        </td>
                        <td class ="f_td_3">
                            <asp:TextBox ID="UserIdTextBox" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class ="f_td_0">
                            起始日期：
                        </td>
                        <td class ="f_td_1"> 
                            <cc1:CalendarExtender ID="CalendarExtender2" TargetControlID ="StartDateTextBox" runat="server">
                            </cc1:CalendarExtender>
                            <asp:TextBox ID="StartDateTextBox" runat="server"></asp:TextBox>
                        </td> 
                        <td class ="f_td_2">
                            结束日期：
                        </td>
                        <td class ="f_td_3">
                            <cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="EndDateTextBox" runat="server">
                            </cc1:CalendarExtender>
                            <asp:TextBox ID="EndDateTextBox" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class ="f_td_0">
                            &nbsp;
                        </td>
                        <td class ="f_td_1" style=" text-align:right ;">  
                            <asp:Button ID="SearchButton" runat="server" CssClass="SubmitCharge" Text="查询" 
                                onclick="SearchButton_Click" />
                        </td> 
                        <td class ="f_td_2"> 
                            &nbsp;
                        </td>
                        <td class ="f_td_3">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </div>
            
            <div style=" margin:10px 15px 10px 15px; border:solid 1px #ECECEC;">
                <div style=" margin-bottom:3px; width:100%; ">
                    <table width="100%">
                        <tr>
                            <td >
                                <asp:CheckBox ID="SelectAllCheckBox" 
                                    AutoPostBack="true" Text="全选"   runat="server" 
                                    oncheckedchanged="SelectAllCheckBox_CheckedChanged" />
                                <asp:CheckBox ID="SelectOthersCheckBox" Text="反选" 
                                    runat="server" AutoPostBack="True" 
                                    oncheckedchanged="SelectOthersCheckBox_CheckedChanged" />  
                                <asp:Button ID="ApprovedButton" runat="server" 
                                    CssClass="CommandButton" Text="审核通过" onclick="ApprovedButton_Click" /> 
                                <asp:Button ID="FinishedButton" runat="server" 
                                    CssClass="CommandButton" Text="提现完成" onclick="FinishedButton_Click" /> 
                                <asp:Button ID="FailedButton" runat="server" 
                                    CssClass="CommandButton" Text="提现失败" onclick="FailedButton_Click" /> 
                                <asp:Button ID="PrintButton" runat="server" 
                                    CssClass="CommandButton" Text="打印申请" onclick="PrintButton_Click" /> 
                            </td>
                        </tr>
                    </table>
                </div> 
                 <%--<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                       Width="100%" DataKeyNames="RECID"
                        BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                        CellPadding="4" ForeColor="Black" GridLines="Vertical">
                        <RowStyle BackColor="#F7F7DE" />
                        <Columns> 
                             <asp:TemplateField>
                                <ItemTemplate>
                                    <div style =" text-align:center ;">
                                        <asp:CheckBox ID="CheckBox1" runat="server" />
                                    </div>
                                </ItemTemplate>
                             </asp:TemplateField>
                             <asp:TemplateField HeaderText ="提现日期">
                                <ItemTemplate>
                                       <%# Convert.ToDateTime(Eval("WithDrawDate")).ToShortDateString()%>
                                </ItemTemplate>
                             </asp:TemplateField> 
                             <asp:TemplateField HeaderText ="提现时间">
                                <ItemTemplate>
                                       <%# (new RuleCode.Common.TTime(Convert.ToInt32(Eval("WithDrawTime")))).StringValue%>
                                </ItemTemplate>
                             </asp:TemplateField>                                                
                             <asp:BoundField  HeaderText ="申请人" DataField ="cbuserid"/> 
                             <asp:TemplateField  HeaderText ="提现金额">
                                <ItemTemplate>
                                     <%#  String.Format("{0:F}", Convert.ToDouble(Eval("Amount"))) + "元" %>
                                </ItemTemplate>
                             </asp:TemplateField> 
                             <asp:TemplateField HeaderText ="状态">
                                <ItemTemplate>
                                       <%#GetWithDrawStatusStr(Convert.ToInt32(Eval("WithDrawStatus")))%>
                                </ItemTemplate>
                             </asp:TemplateField>   
                             <asp:TemplateField HeaderText ="审核时间">
                                <ItemTemplate>
                                       <%#  (Convert.ToDateTime( Eval("ApprovedDate")) == (new DateTime (1900,1,1))) ? "" : Eval("ApprovedDate").ToString()%>
                                </ItemTemplate>
                             </asp:TemplateField> 
                             <asp:TemplateField HeaderText ="完成时间">
                                <ItemTemplate>
                                       <%#  (Convert.ToDateTime(Eval("FinishedDate")) == (new DateTime(1900, 1, 1))) ? "" : Eval("FinishedDate").ToString()%>
                                </ItemTemplate>
                             </asp:TemplateField> 
                             <asp:TemplateField HeaderText ="详情">
                             </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#CCCC99" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                </asp:GridView>--%>
                <table width="100%" style=" text-align:center; background-color:lightGray"  cellpadding="0" cellspacing="0">
                    <tr>     
                        <td class="td_01">&nbsp;</td>          
                        <td class="td_0">提现流水号</td>
                        <td class="td_1">申请时间</td>
                        <td class="td_2">申请人</td>
                        <td class="td_3">金额</td>
                        <td class="td_4">银行账户信息</td> 
                        <td class="td_5">状态</td>     
                        <td class="td_6">详情</td>
                    </tr>
                </table>
                <asp:DataList ID="DataList1" DataKeyField="RECID" runat="server" Width="100%">
                    <ItemTemplate>
                        <table width="100%"  onmouseover="this.bgColor='#EAF4FF';" onmouseout="this.bgColor='white';"
                            style=" margin:3px 0px 3px 0px; border-bottom:dashed 1px lightGray;" cellpadding="0" cellspacing="0">
                            <tr>  
                                <td class="td_01">
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </td>               
                                <td class="td_0">
                                    <span ><%#Eval("WithDrawId").ToString().Substring(0, 16) + "<br/>" + Eval("WithDrawId").ToString().Substring(16, 16)%></span>
                                </td>
                                <td class="td_1">
                                    <%#Convert.ToDateTime(Eval("WithDrawDate")).ToShortDateString() + "</br> " + (new RuleCode.Common.TTime(Convert.ToInt32(Eval("WithDrawTime")))).StringValue %>
                                </td>
                                <td class="td_2">
                                    <%#Eval("cbuserid").ToString()%>
                                </td>
                                <td class="td_3">
                                    <%# String.Format("{0:F}", Convert.ToDouble(Eval("Amount"))) + "元"%>
                                </td>
                                <td class="td_4">
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                         <tr>
                                            <td class="b_td_0">开户名：</td>
                                            <td class="b_td_1"><%#Eval("BankAccountName").ToString()%></td>
                                         </tr> 
                                         <tr>
                                            <td class="b_td_0">账号：</td>
                                            <td class="b_td_1"><%# GetAccountNumber(Eval("BankAccount").ToString())%></td>
                                         </tr>
                                         <tr>
                                            <td class="b_td_0">银行名称：</td>
                                            <td class="b_td_1"><%#Eval("BankName").ToString()%></td>
                                         </tr>
                                    </table>
                                </td> 
                                <td class="td_5">
                                   <%#GetWithDrawStatusStr(Convert.ToInt32(Eval("WithDrawStatus")))%>
                                </td>
                                <td class="td_6" >
                                   <a style="color:blue; text-decoration :underline;" target="_blank" href='<%# "WithDrawDetail.aspx?rid="+Eval("RECID").ToString() %>'>详情</a>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
                <cc2:WebPager ID="WebPager1" runat="server" ControlToPaginate="DataList1" OnPageIndexChanged ="WebPager1_PageIndexChanged" 
                PageSize="20" /> 
                
                
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
      
                                 
    </div>
</asp:Content>
